package com.itheima.dao;

import com.github.pagehelper.Page;
import com.itheima.pojo.Role;

import java.util.List;
import java.util.Map;
import java.util.Set;

public interface RoleDao {
    public Set<Role> findByUserId(Integer userId);
    //根据id查role全部信息
    Role findRoleById(Integer id);

    List<Role> findAll();

    void add(Role role);

    void addRoeAndPermssion(Map<String, Integer> map);

    void addRoleAndMenu(Map<String, Integer> map);


    Page<Role> findPage(String queryString);

    void edit(Role role);

    Role findById(Integer id);

    List<Integer> findRoleAndMenus(Integer id);

    List<Integer> findRoleAndPermssions(Integer id);

    void deleteRoleAndMenus(Integer id);

    void deleteRoleAndPerssions(Integer id);

    void deleteRole(Integer id);
}
